﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Cheetah_Fast_Banking_App
{
    public partial class FormLogin : Form
    {
        public string AccountName
        {
            get {return textBoxAccountName.Text;}
        }

        public string PasswordHash
        {
            get { return textBoxPassword.Text; }
        }
        
        public FormLogin()
        {
            InitializeComponent();
        }

        private void buttonClose_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            this.Close();
        }

        private void buttonLogin_Click(object sender, EventArgs e)
        {
            this.Hide();
            this.DialogResult = DialogResult.OK;
        }

        public void InvalidCredentials()
        {
            MessageBox.Show("Invalid Login Credentials.  Please try again.", "Invalid Login", MessageBoxButtons.OK, MessageBoxIcon.Error);
            textBoxPassword.Text = "";
            textBoxPassword.Focus();
        }
    }
}
